home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / lib / tex / inputs / slides.tex < prev    next >
Encoding:
Text File  |  1991-05-21  |  17.3 KB  |  514 lines

  1. % Created 5 June 1984
  2.  
  3. \documentstyle[twoside]{report}
  4.  
  5. \oddsidemargin -2pt
  6. \evensidemargin 96pt
  7.  
  8. \newskip\foobarskip
  9. \foobarskip=10pt plus 5pt minus 5pt
  10. \newlength{\pagewidth}
  11. \setlength{\pagewidth}{\textwidth}
  12. \addtolength\pagewidth\marginparwidth
  13. \addtolength\pagewidth\marginparsep
  14.  
  15. \makeatletter
  16. \def\ps@headings{\def\@oddfoot{}%
  17. \def\@oddhead{\makebox[\textwidth][l]{\underline{\hbox to \pagewidth{\bf
  18. \firstmark\hfill\thepage}}}}%
  19. \def\@evenfoot{}%
  20. \def\@evenhead{\makebox[\textwidth][r]{\underline{\hbox to \pagewidth{\bf
  21. \thepage\hfill\@lhead}}}}%
  22. \def\chaptermark##1{\mark{}\def\@lhead{##1}}%
  23. \def\sectionmark##1{{\let\protect\noexpand\mark{\thesection 
  24.     \hskip 1em##1}}}}
  25.  
  26. \pagestyle{headings}
  27.  
  28.  
  29.  
  30.  
  31. \newlength\examboxwidth
  32. \setlength\examboxwidth{.5\pagewidth}
  33. \addtolength\examboxwidth{-13pt}
  34. \def\exambox{\par\addvspace\foobarskip\setbox0=\hbox 
  35.   to \pagewidth\bgroup \hspace*{3pt}\small \minipage[t]{\examboxwidth}}
  36. \def\midbox{\endminipage\hfill\minipage[t]{\examboxwidth}}
  37. \def\endexambox{\endminipage\hspace{3pt}\egroup 
  38. \setbox0=\hbox{\frame{\vbox{\vskip 3pt \box0 \vskip 3pt}}}
  39. \noindent \rule{0pt}{\ht0}
  40. \marginpar[{\makebox[0pt][l]{\copy0}}]{\makebox[\marginparwidth][r]{\copy0}}
  41.     \par\vskip\foobarskip}
  42.  
  43. \long\def\exampage#1{\mbox{}\hfill\raisebox{-176pt}{\framebox(145,188){\vbox 
  44.    to 153pt{\hsize=115pt #1}}}\hfill\mbox{}}
  45.  
  46. \long\def\slidepage#1{\exampage{\xipt \baselineskip=13.5pt \sf #1}}
  47.  
  48. \parskip 0pt plus 1pt 
  49. \nofiles
  50.  
  51.  
  52. \newcommand\bs{\char '134 }  % A backslash character for \tt font
  53. \newcommand\lb{\char '173 }  % A left brace character for \tt font
  54. \newcommand\rb{\char '175 }  % A right brace character for \tt font
  55. \newcommand{\xsp}{\hspace{.3em}}
  56. \newcommand{\Xsp}{\nolinebreak\hspace{.3em}}
  57. \newcommand{\yspace}{\vspace{1.1ex}}
  58. \newcommand{\remindbox}[1]{\begin{center}
  59. \fbox{\parbox{300pt}{\it #1}}
  60. \end{center}}
  61. \newcommand{\warningbox}[1]{\par\vskip 6pt
  62. {\it \noindent\underline{Warning:}
  63. #1}\par\vskip 6pt}
  64.  
  65. \setlength{\unitlength}{1pt}
  66.  
  67.  
  68. \def\LATEX{L\kern-.3em\raise.8ex\hbox{a}\TeX}
  69. \let\TEX = \TeX
  70. \def\BIBTEX{BIB\kern-.1em\TeX}
  71. \def\SLITEX{S\kern-.065em L\kern-.18em\raise.32ex\hbox{i}\kern-.03em\TEX}
  72.  
  73.  
  74. % TEMPORARY DEFINITIONS
  75. \def\knuth{The \TEX book}
  76.  
  77. %&t&\mbox{\tt #}&
  78. %&h&\hbox#& 
  79. %&v&\hbox{\verb"#"}&
  80. %&m&\mbox{#}& 
  81. %&i&\index{#}&
  82. %&x&\xsp{}#& 
  83. %&.&\Xsp.#& 
  84.  
  85.  
  86. \begin{document}
  87.  
  88. \begin{titlepage}
  89. \vspace*{2in}
  90. \begin{center}
  91. \Large Addendum \\to the
  92. Second Preliminary Edition\\
  93. (dated December 13, 1983)\\
  94. of the\\
  95. \LARGE \LATEX{} Manual\\[.3in]
  96. \large Leslie Lamport\\
  97. \today
  98. \end{center}
  99. \end{titlepage}
  100.  
  101.  
  102. \appendix
  103.  
  104. \setcounter{chapter}{2}
  105. \setcounter{page}{156}
  106.  
  107. \chapter{Making Color Slides
  108.   With \protect\SLITEX}
  109.  
  110. \section{How \protect\SLITEX{} Makes Colors}
  111.  
  112. \SLITEX{} \index{!slitex} is a version of \LATEX{} designed for making
  113. color \index{color slides}\index{slides,color}slides, \index{slides}
  114. though you can use it for black-and-white \index{slides,black and
  115. white} slides as well.  You don't need a special printer to make color
  116. slides; \SLITEX{} uses the same black-and-white printer as \LATEX.
  117. You get color slides by copying \SLITEX's output onto colored
  118. transparencies.  To see how this works, suppose you want to make
  119. the following slide:\footnote{The illustrations of slides used here are not
  120. accurate representations of the output actually produced by
  121. \SLITEX.}
  122. \begin{center}
  123. \slidepage{\hbox to \hsize{\small +\hfill +}
  124.     \vfill
  125.     \noindent\hspace*{20pt}\rule{0pt}{25pt}RED\\
  126.     \hspace*{20pt}\rule{0pt}{25pt}BLACK\\
  127.     \hspace*{20pt}\rule{0pt}{25pt}BLUE
  128.     \vfill
  129.     \hbox to \hsize{\small +\hfill \makebox[2em][l]{9}}}
  130. \end{center}
  131. where ``{\sf RED}'' is colored red, ``{\sf BLACK}'' is colored black,
  132. and ``{\sf BLUE}'' is colored blue.  \SLITEX{} would generate
  133. the following three separate pages of output for this slide:
  134.  
  135. {\setbox0=\hbox to \pagewidth
  136. {\slidepage{\hbox to \hsize{\small +\hfill +}
  137.     \vfill
  138.     \noindent\hspace*{20pt}\rule{0pt}{25pt}RED\\
  139.     \hspace*{20pt}\rule{0pt}{25pt}\\
  140.     \hspace*{20pt}\rule{0pt}{25pt}
  141.     \vfill
  142.     \hbox to \hsize{\small +\hfill \makebox[2em][l]{9}}}\hfill
  143. \slidepage{\hbox to \hsize{\small +\hfill +}
  144.     \vfill
  145.     \noindent\hspace*{20pt}\rule{0pt}{25pt}\\
  146.     \hspace*{20pt}\rule{0pt}{25pt}BLACK\\
  147.     \rule{0pt}{25pt}
  148.     \vfill
  149.     \hbox to \hsize{\small +\hfill \makebox[2em][l]{9}}}\hfill
  150. \slidepage{\hbox to \hsize{\small +\hfill +}
  151.     \vfill
  152.     \rule{0pt}{25pt}\\
  153.     \rule{0pt}{25pt}\\
  154.     \hspace*{20pt}\rule{0pt}{25pt}BLUE
  155.     \vfill
  156.     \hbox to \hsize{\small +\hfill \makebox[2em][l]{9}}}}
  157. \par
  158. \vskip\foobarskip
  159. \noindent \vrule width 0pt height \ht0 depth \dp0
  160. \marginpar[{\makebox[0pt][l]{\copy0}}]{\makebox[\marginparwidth][r]{\copy0}}
  161.     \par\vskip\foobarskip}
  162.  
  163. These pages are called {\it color \index{color layer} layers}.  Each
  164. color layer is then copied onto a special sheet that produces a
  165. transparency of the appropriate color.  (Such sheets are commercially
  166. available for an assortment of colors.)  The slide is produced by
  167. laying the three transparencies on top of one another.
  168.  
  169. I will refer to the text that is meant to be colored red on the slide,
  170. and is therefore printed by \SLITEX{} on the red color layer, as ``red
  171. text''.  So, remember that when I write about the color of
  172. a piece of text, I'm referring only to the color layer on which it
  173. appears; \SLITEX{} doesn't print anything in red ink.
  174.  
  175. It's hard to tell what a slide will look like from the
  176. separate color layers.  Therefore, \SLITEX{} also produces a
  177. black-and-white version of the slide, containing all the color layers
  178. properly superimposed.  When first making a set of slides, you should
  179. generate only the black-and-white versions, making the color layers
  180. after you've fixed all the problems that are visible in the
  181. black-and-white versions.  If you don't want color slides, you
  182. don't have to make any color layers, and can copy the black-and-white
  183. versions onto transparencies.
  184.  
  185.  
  186. \section{The Root File}
  187.  
  188. \SLITEX{} is a separate program that you run the same way you run
  189. \LATEX{}, giving it the first name of an input file whose second name
  190. is \xsp{}\mbox{\tt .tex}\Xsp.  This file is called the {\it root
  191. \index{root file} file}.  As usual, I'll suppose that your root file
  192. is named \index{myfile.tex}\xsp{}\mbox{\tt myfile.tex}\Xsp.  This file
  193. starts out with the customary
  194. \xsp\hbox{\verb"\pagelayout"}\index{!pagelayou}\xsp{} 
  195. and \linebreak %%%%%%
  196. \xsp{}\hbox{\verb"\documentstyle"}\index{!documentstyle}\xsp{}
  197. commands.  The standard page layout and document styles for making
  198. slides are both named \xsp{}\mbox{\tt slides}\Xsp,\index{slides
  199. document style} so your file is likely to begin
  200. \begin{verbatim}
  201.        \pagelayout{slides}
  202.        \documentstyle{slides}
  203. \end{verbatim}
  204. The commands are followed by any declarations that you may want to
  205. make, followed in turn by the \xsp{}\hbox{\verb"\begin{document}"}\Xsp.
  206.  
  207. Any text that comes after the \xsp{}\hbox{\verb"\begin{document}"}\xsp{}
  208. is treated as
  209. ``front \index{front matter} matter''
  210. and not as slide material.  You can use it for notes to
  211. identify the slides.   
  212. \begin{exambox}
  213. \slidepage{\vfill
  214. This is an example of front matter.
  215. Note the different type style, and how the
  216. text is centered on the page. 
  217. \par\vfill}
  218. \midbox
  219. \begin{verbatim}
  220. \begin{document}
  221.  
  222. This is an example of front matter.
  223. Note the different type style, and how 
  224. the text ...
  225. \end{verbatim}
  226. \end{exambox}
  227.  
  228. For \SLITEX{} to produce color slides, you have to tell it what colors
  229. you will be using.  This is done with the
  230. \xsp{}\hbox{\verb"\colors"\index{!colors}}\xsp{} command.  The command
  231. \begin{verbatim}
  232.        \colors{red,black,blue}
  233. \end{verbatim}
  234. states that you will be using three colors, which you have named
  235. \xsp{}\mbox{\tt red}\Xsp, \xsp{}\mbox{\tt black}\Xsp, and
  236. \xsp{}\mbox{\tt blue}\Xsp.  \SLITEX{} knows nothing about real colors,
  237. so you could just as well have called your three colors \mbox{\tt
  238. puce}, \mbox{\tt mauve}, and \mbox{\tt fred}.  If you're making only
  239. black-and-white slides, then you don't need a
  240. \xsp{}\hbox{\verb"\colors"}\xsp{} command.
  241.  
  242. The text of your slides is contained not in \xsp{}\mbox{\tt
  243. myfile.tex}\Xsp, but in a separate {\it slide \index{slide file}
  244. file}.  This file can have any name that ends in \mbox{\tt .tex}; I
  245. will assume that it is called \xsp{}\mbox{\tt myslid.tex}\Xsp.  What
  246. goes into the file \xsp{}\mbox{\tt myslid.tex}\xsp{} is explained
  247. below.  Black-and white-slides are generated by placing the following
  248. command in the root file:\index{!blackandwhite}
  249. \begin{verbatim}
  250.        \blackandwhite{myslid}
  251. \end{verbatim}
  252. Color slides are generated by the command\index{!colorslides}
  253. \begin{verbatim}
  254.        \colorslides{myslid}
  255. \end{verbatim}
  256. The \xsp{}\hbox{\verb"\colorslides"}\xsp{} command generates a set of
  257. color layer pages for each color specified by the
  258. \hbox{\verb"\colors"} command.  For example, the command
  259. \begin{verbatim}
  260.        \colors{red,black,blue}
  261. \end{verbatim}
  262. causes a subsequent \xsp{}\hbox{\verb"\colorslides"}\xsp{} command to
  263. generate first all the red color-layer pages, then the black ones, and
  264. then the blue ones.
  265.  
  266. As usual, your root file ends with an
  267. \xsp{}\hbox{\verb"\end{document}"}\xsp{} command.
  268.  
  269. \section{The Slide File}
  270.  
  271. The main purpose of the root file is to tell \SLITEX{} what colors to
  272. use and where to find the slide file, so the root file tends to be pretty
  273. short.  It's the slide file that actually makes the individual
  274. slides.
  275.  
  276.  
  277. \subsection{Slides}
  278.  
  279. Each slide is produced by a \xsp{}\mbox{\tt \index{slide
  280. environment}slide}\xsp{} environment.  This environment has a single
  281. argument, which is a list of all the colors contained on the slide.
  282. For example, a slide that has the colors \xsp{}\mbox{\tt red}\xsp{}
  283. and \xsp{}\mbox{\tt blue}\xsp{} is created by an environment
  284. \begin{verbatim}
  285.        \begin{slide}{red,blue}
  286.        ...
  287.        \end{slide}
  288. \end{verbatim}
  289. The colors in the argument must have been declared by a
  290. \xsp{}\hbox{\verb"\colors"\index{!colors}}\xsp{} command in the root
  291. file.  They tell \SLITEX{} which color layers to produce for this
  292. particular slide.  If there is green text in the slide, that text will
  293. appear in the black-and-white version, but no green color layer will
  294. be generated unless \xsp{}\mbox{\tt green}\xsp{} is included in the
  295. \xsp{}\mbox{\tt slide}\xsp{} environment's argument.  If you want only
  296. black-and-white slides, then you can use a null argument:
  297. \begin{verbatim}
  298.        \begin{slide}{}
  299.        ...
  300. \end{verbatim}
  301.  
  302. The text that appears on a slide is produced using ordinary \LATEX{}
  303. commands.  You can use any commands that make sense for slides.
  304. Commands that {\it don't\/} make sense include sectioning commands,
  305. \xsp{}\mbox{\tt figure}\xsp{} and \xsp{}\mbox{\tt table}\xsp{}
  306. environments, indexing commands, commands for generating a
  307. bibliography, and page-breaking commands.  The latter make no sense in
  308. a slide because each slide must fit on a single page.  You can use an
  309. \xsp{}\hbox{\verb"\input"\index{!input}}\xsp{} command, but not an
  310. \xsp{}\hbox{\verb"\include"}\xsp{} command.  Commands for producing
  311. only some of the slides in your slide file are described below.
  312.  
  313. There are two major differences between the text generated by
  314. \SLITEX{} and that generated by \LATEX{}.  First of all, text is
  315. automatically centered vertically on the slide.  Secondly, and most
  316. noticable, \SLITEX{} uses a set of type \index{type faces} faces
  317. especially chosen for slides.  The characters in these type faces are
  318. much larger than the ones in the corresponding \LATEX{} type faces.
  319. \SLITEX's \xsp{}\hbox{\verb"\normalsize"}\xsp{} produces roughly the
  320. same size characters as \LATEX's \xsp{}\hbox{\verb"\LARGE"}\Xsp.
  321. Also, \SLITEX's ordinary Roman type style is similar to \LATEX's sans
  322. serif style.  Besides Roman, the only other type styles generally
  323. available are italic (\hbox{\verb"\it"}), bold (\hbox{\verb"\bf"}),
  324. and typewriter (\hbox{\verb"\tt"}).
  325.  
  326. The only commands you need inside a slide that aren't present in
  327. ordinary \LATEX{} input are ones to tell \SLITEX{} what color the text
  328. is.  The \xsp{}\hbox{\verb"\colors"}\xsp{} command in your root file
  329. defines the declarations \index{color declarations} for doing this.
  330. For example, if the root file contains the command
  331. \xsp{}\hbox{\verb"\colors{red,black,blue}"}\Xsp,
  332. then \xsp{}\hbox{\verb"\red"}\Xsp, \xsp{}\hbox{\verb"\black"}\Xsp, and
  333. \xsp{}\hbox{\verb"\blue"}\xsp{} are declarations that specify the
  334. color.  They work just like any other declaration, such as
  335. \xsp{}\hbox{\verb"\bf"}\Xsp, having the same scoping rules.  This is
  336. illustrated below, where only the red color layer is shown.
  337. \begin{exambox}
  338. \slidepage{\hbox to \hsize{\small +\hfill +}
  339. \vfill
  340. This is red text with two
  341. \makebox[50pt]{}.
  342.  
  343. This is more red text.
  344. \vfill 
  345. \hbox to \hsize{\small +\hfill \makebox[2em][l]{6}}}
  346. \midbox
  347. \begin{verbatim}
  348. \red
  349. \begin{slide}{red,blue}
  350.    This is red text with two 
  351.    {\blue blue words}.
  352.  
  353.    This is more red text.
  354. \end{slide}
  355. \end{verbatim}
  356. \end{exambox}
  357. A color declaration does not affect the type style, as illustrated
  358. by the following example, where again only the red color layer is
  359. shown.
  360.  
  361. \begin{exambox}
  362. \slidepage{\hbox to \hsize{\small +\hfill +}
  363. \vfill
  364. \it This is red italic.
  365. \vfill
  366. \hbox to \hsize{\small +\hfill\makebox[2em][l]{7}}}
  367. \midbox
  368. \begin{verbatim}
  369. \begin{slide}{red,blue}
  370.   \begin{blue} This is blue Roman text.
  371.       {\it This is blue italic.
  372.  
  373.            {\red This is red italic.}
  374.  
  375.            This is more blue italic.    }
  376.       This is blue Roman.
  377.   \end{blue}
  378. \end{slide}
  379. \end{verbatim}
  380. \end{exambox}
  381.  
  382. The command \xsp{}\hbox{\verb"\invisible"\index{!invisible}}\xsp{} is
  383. a special color declaration for invisible text.  Invisible text is not
  384. only colorless, appearing in no color layer, but does not appear in
  385. the black-and-white version either.  The use of invisible text is
  386. explained below.
  387.  
  388. \warningbox{Don't use a color declaration or an 
  389. \xsp\hbox{\tt \bs invisible}\xsp{} command in math mode.}
  390.  
  391. \warningbox{Certain horizontal lines drawn by\/ {\rm \TEX} will appear
  392. in color layers where they shouldn't.  The offending lines are the
  393. ones produced by \xsp{}\mbox{\tt \index{!underline}\bs underline}\Xsp,
  394. \xsp{}\mbox{\tt \index{!overline}\bs overline}\Xsp, and
  395. \xsp{}\mbox{\tt \index{!frac}\bs frac}\Xsp.}
  396.  
  397. \subsection{Overlays}
  398.  
  399. The \xsp{}\mbox{\tt overlay\index{overlay environment}}\xsp{}
  400. environment is exactly the same as the \xsp{}\mbox{\tt slide}\xsp{}
  401. environment except for how the page is numbered.  The first
  402. \xsp{}\mbox{\tt overlay}\xsp{} following slide number~9 is numbered
  403. ``9a'', the second one is numbered ``9b'', and so forth.  To make an
  404. overlay that perfectly overlays a slide, the slide and the overlay
  405. should be absolutely identical except that text visible in one should
  406. be invisible in the other.  This is illustrated by the following
  407. example.
  408.  
  409. \settowidth{\dimen2}{\xipt\sf overlay}
  410. \settowidth{\dimen0}{\xipt \sf An}
  411. \begin{exambox}
  412. \slidepage{\hbox to \hsize{\small +\hfill +}
  413. \vfill
  414. An \makebox[\dimen2]{} goes here.\par
  415. \vfill 
  416. \hbox to \hsize{\small +\hfill \makebox[2em][l]{9}}}
  417. \midbox
  418. \begin{verbatim}
  419. \begin{slide}{red}
  420.  
  421. \red
  422. An {\invisible overlay}
  423. goes here.
  424.  
  425. \end{slide}
  426. \end{verbatim}
  427. \end{exambox}
  428. \begin{exambox}
  429. \slidepage{\hbox to \hsize{\small +\hfill +}
  430. \vfill
  431. \makebox[\dimen0]{} overlay \par
  432. \vfill 
  433. \hbox to \hsize{\small +\hfill \makebox[2em][l]{9-a}}}
  434. \midbox
  435. \begin{verbatim}
  436. \begin{overlay}{red}
  437.  
  438. \invisible
  439. An {\red overlay}
  440. goes here.
  441.  
  442. \end{overlay}
  443. \end{verbatim}
  444. \end{exambox}
  445.  
  446. The slide and the overlay will match up to read
  447. \[ \mbox{\xipt \sf An overlay goes here.} \]
  448. when placed atop one another.
  449.  
  450. \subsection{Notes}
  451.  
  452. It is sometimes convenient to put notes to yourself in with the
  453. slides.  The \mbox{\tt note}\index{note environment} environment
  454. produces a one-page note that appears only in the black-and-white
  455. versions of the slides.  For example,
  456. \begin{exambox}
  457. \slidepage{\vfill This is a note to myself,
  458. perhaps reminding me of
  459. what I wanted to say here.
  460. \vfill 
  461. \hbox to \hsize{\small \hfill 9-1}}
  462. \midbox
  463. \begin{verbatim}
  464. \begin{note}
  465.  
  466.   This is a note to myself,
  467.   perhaps ...
  468.  
  469. \end{note}
  470. \end{verbatim}
  471. \end{exambox}
  472.  
  473. \noindent 
  474. Notes that follow slide number~9 are numbered
  475. ``9-1'', ``9-2'', etc.  
  476.  
  477.  
  478. \section{Making Some of the Slides}
  479.  
  480. For making corrections, it's handy to be able to produce a subset of
  481. the slides in your file.  The command\index{!onlyslides}
  482. \begin{verbatim}
  483.        \onlyslides{4,7-13,23}
  484. \end{verbatim}
  485. in the root file will cause the following
  486. \xsp{}\hbox{\verb"\blackandwhite"}\xsp{} and
  487. \xsp{}\hbox{\verb"\colorslides"}\xsp{} commands to generate only
  488. slides numbered 4, 7-13 (inclusive) and 23, plus all of their
  489. overlays.  The slide numbers in the argument must be in ascending
  490. order, and can include nonexistent slides---for example, you can type
  491. \begin{verbatim}
  492.        \onlyslides{10-9999}
  493. \end{verbatim}
  494. to produce all but the first nine slides.  The argument of the
  495. \xsp{}\hbox{\verb"\onlyslides"}\xsp{} command must be nonempty.
  496.  
  497. There is also an analogous
  498. \xsp{}\hbox{\verb"\onlynotes"\index{!onlynotes}}\xsp{} command to
  499. generate a subset of the notes.  Notes numbered 11-1, 11-2, etc. will
  500. all be generated by specifying page 11 in the argument of the
  501. \xsp{}\hbox{\verb"\onlynotes"}\xsp{} command.
  502.  
  503. If your input has an \xsp{}\hbox{\verb"\onlyslides"}\xsp{} command and
  504. no \hbox{\verb"\onlynotes"} command, then notes will be produced for
  505. the specified slides.  If there is an
  506. \xsp{}\hbox{\verb"\onlynotes"}\xsp{} command but no
  507. \xsp{}\hbox{\verb"\onlyslide"}\xsp{} command, then no slides will be
  508. produced.  Including both an \xsp{}\hbox{\verb"\onlyslides"}\xsp{} and
  509. an \xsp{}\hbox{\verb"\onlynotes"}\xsp{} command has the expected
  510. effect of producing only the specified slides and notes.
  511.  
  512. \end{document}
  513.  
  514.